package com.handytoo.cow;

import com.handytoo.cow_core.network.Config.HandlerAdapterConfig;
import com.handytoo.cow_core.network.Config.TcpConfig;
import com.handytoo.cow_core.orm.Config.OrmConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * SpringBootApplication 注解包含EnableAutoConfiguration
 * 当EnableAutoConfiguration开启后，逐步加载：
 * 1 加载spring.factories配置的注册内容
 * 2 加载各个组件对应的AutoConfiguration
 * 3 加载前置加载和starter
 */
@SpringBootApplication(scanBasePackages = {"com.handytoo.cow"})
// 显式启用配置类
@EnableConfigurationProperties({TcpConfig.class, HandlerAdapterConfig.class, OrmConfig.class})
@EnableScheduling
@Slf4j
public class CowApplication {
    public static void main(String[] args) {
        SpringApplication.run(CowApplication.class, args);
    }

}
